<template>
  <div id="app">
    <Header></Header>
    <router-link to="/home"></router-link>
    <router-link to="/login"></router-link>
    <router-link to="/register"></router-link>
    <router-link to="/search"></router-link>
    <!-- 路由占位符 -->
    <router-view></router-view>
    <Footer v-show="$route.meta.show"></Footer>
  </div>
</template>

<script>
import Header from '@/components/Header/index.vue'
import Footer from '@/components/Footer/index.vue'

export default {
  components: {
    Header,
    Footer,
  },
  created() {
    //通知Vuex获取数据
    this.$store.dispatch('categeroyList')
  },
}
</script>

<style lang="less">
#app {
}
</style>
